home *** CD-ROM | disk | FTP | other *** search
/ CD Exchange / CD Exchange - Volume 1.iso / utils / misc / machv / programmer.lha / headers / mach.h next >
C/C++ Source or Header  |  1993-12-17  |  20KB  |  490 lines

  1. #ifndef MACH_H
  2. #define MACH_H
  3.  
  4. /* $Log:    mach.h,v $
  5.  * Revision 37.002  93/10/14  08:48:00  Brian
  6.  * Release 5.0.
  7.  *
  8.  *
  9.  */
  10.  
  11. #include <ctype.h>
  12. #include <devices/input.h>
  13. #include <devices/inputevent.h>
  14. #include <dos/datetime.h>
  15. #include <exec/types.h>
  16. #include <exec/libraries.h>
  17. #include <exec/memory.h>
  18. #include <exec/ports.h>
  19. #include <exec/semaphores.h>
  20.  
  21.  
  22. /* Clock Types */
  23.  
  24. #define CLOCK_ONLY            0    /* hh:mm:ss */
  25. #define CLOCK_PLUSMEMORY    1    /* Chip xxxx Fast xxxxx   hh:mm:ss */
  26. #define CLOCK_MEMORYONLY    2    /* Chip xxxx Fast xxxxx */
  27. #define CLOCK_PLUSDATE        3    /* 03-16-93   hh:mm:ss */
  28. #define CLOCK_COORDS        4    /* xxx  yyy */
  29. #define CLOCK_COMMANDBAR    5    /* gadgets only! */
  30.  
  31. #define CLOCK_BORDER_RIGHT    0    /* size gadget uses border on right. Normal */
  32. #define CLOCK_BORDER_BOTTOM    1    /* size gadget uses bottom border */
  33. #define CLOCK_BORDERLESS    2    /* no border at all! */
  34.  
  35. #define KEYTASK    "KeyTask"        /* task name for "Select A Hotkey" */
  36. #define MACHV_REXX "MACHV_REXX"
  37.  
  38. #define UNKEYED                128    /* index for unkeyed macros */
  39. #define MAXKEYS                128    /* keycodes 0-127. 128 is unkeyed */
  40. #define MAX_CFG_TITLE        80    /* configuration title length */
  41. #define MAX_LIST_TITLE        15    /* list window title */
  42. #define MAX_LIST_STRINGBUF    14    /* string gadget under list gadget */
  43. #define MAX_MACRO_NAME        MAX_LIST_STRINGBUF    
  44. #define MAX_DIR_NAME        80    /* path to MachV.prefs */
  45. #define MAX_FILE_NAME        31    /* MachV.prefs */
  46. #define MAX_PASTE_APPEND    7    /* pasting prepend and append text */
  47. #define MAX_ALARM_COMMAND    80    /* length of command for CLK_ALARM to use */
  48. #define MAX_SETMACH_PATH    40    /* path to find SetMachV */
  49. #define MAX_CUSTOM_MESSAGE  30  /* largest message for the clock. inc. \0 */
  50.  
  51. #define MAX_VARIABLE        80    /* number of chars for ml_Variable */
  52. #define MAX_VARNAME            40    /* number of chars for ml_VarName */
  53.  
  54. #define MAX_AREXX_RESULT    80    /* max length of results returned */
  55.  
  56. #define MAX_NO_LAYERS        10    /* number of window titles to NOT layer */
  57.  
  58. #define DEFAULTS_SIZE        41    /* sizeof default cfg */
  59.  
  60. #define GAD_NOPOS             -1    /* clock gadget has no position yet */
  61.  
  62. /* The following are set in ml_GeneralEvent and then MachV is signaled.
  63.    Some must be send with PutMsg(). These are noted below. */
  64.  
  65. #define GE_BBLANK                0    /* blank the screen */
  66. #define GE_BUNBLANK                1    /* unblank it */
  67. #define GE_BBEEP                2    /* tell MachV to beep */
  68. #define GE_BKILLCLOCK            3    /* kill the clock */
  69. #define GE_BRUNCLOCK            4    /* run it */
  70. #define GE_BADDCONFIG            5    /* add new configuration. Use PutMsg() */
  71. #define GE_BDELCONFIG            6    /* del configuration. Use PutMsg() */
  72. #define GE_BSAVECONFIG            7    /* save configuration. Use PutMsg() */
  73. #define GE_BLOADCONFIG            8    /* load configuration. Use PutMsg() */
  74. #define GE_BSET_VARIABLE        9    /* set variable ml_VarName to ml_Variable */
  75. #define GE_BUPDATESETMACH        10    /* tell MachV to send update msg to interface */
  76. #define GE_BLOADBEEP            11    /* load a beep sound file. pathname in */
  77.                                     /* ml_BeepFileName */
  78. #define GE_BSCREENUP            12    /* tell MachV to tell interface to come */
  79.                                     /* to front and scroll up. */
  80. #define GE_BABORTPRINT            13    /* abort printing */
  81. #define GE_BDISPLAYTIME            14    /* display time (or message) in clock */
  82. #define GE_BFREEGADGETS            15    /* free clock gadgets */
  83. #define GE_BSET_MOUSE_PORT        16    /* set mouse port. port in mc_MousePort */
  84. #define GE_BNEWCONFIG            17    /* tell MachV to switch configurations */
  85. #define GE_BPRINTCLIP            18    /* print clipboard */
  86. #define GE_BUPDATE_PATTERNS        19    /* tell MachV to update its StringPatterns */
  87. #define GE_BTRACE                20    /* toggle tracing */
  88. #define GE_BNEW_WINDOW            21    /* tell MachV a new window is active */
  89. #define GE_BHOTKEY                22    /* tell MachV to do a hotkey */
  90. #define GE_BDO_VAR                23    /* set variable ml_VarName to ml_Variable */
  91.                                     /* Use PutMsg(). \0 as first char gets it. */
  92.                                     /* -1 as 1st char deletes the variable. */
  93.  
  94.            /* general event signals */
  95.  
  96. #define GE_BLANK                (1 << GE_BBLANK)
  97. #define GE_UNBLANK              (1 << GE_BUNBLANK)
  98. #define GE_BEEP                 (1 << GE_BBEEP)
  99. #define GE_KILLCLOCK            (1 << GE_BKILLCLOCK)
  100. #define GE_RUNCLOCK             (1 << GE_BRUNCLOCK)
  101. #define GE_ADDCONFIG            (1 << GE_BADDCONFIG)
  102. #define GE_DELCONFIG            (1 << GE_BDELCONFIG)
  103. #define GE_SAVECONFIG           (1 << GE_BSAVECONFIG)
  104. #define GE_LOADCONFIG           (1 << GE_BLOADCONFIG)
  105. #define GE_SET_VARIABLE         (1 << GE_BSET_VARIABLE)
  106. #define GE_UPDATESETMACH        (1 << GE_BUPDATESETMACH)
  107. #define GE_LOADBEEP             (1 << GE_BLOADBEEP)
  108. #define GE_SCREENUP             (1 << GE_BSCREENUP)
  109. #define GE_ABORTPRINT           (1 << GE_BABORTPRINT)
  110. #define GE_DISPLAYTIME          (1 << GE_BDISPLAYTIME)
  111. #define GE_FREEGADGETS          (1 << GE_BFREEGADGETS)
  112. #define GE_SET_MOUSE_PORT       (1 << GE_BSET_MOUSE_PORT)
  113. #define GE_NEWCONFIG            (1 << GE_BNEWCONFIG)
  114. #define GE_PRINTCLIP            (1 << GE_BPRINTCLIP)
  115. #define GE_UPDATE_PATTERNS      (1 << GE_BUPDATE_PATTERNS)
  116. #define GE_TRACE                (1 << GE_BTRACE)
  117. #define GE_NEW_WINDOW           (1 << GE_BNEW_WINDOW)
  118. #define GE_HOTKEY               (1 << GE_BHOTKEY)
  119. #define GE_DO_VAR               (1 << GE_BDO_VAR)
  120.  
  121. /* These are set in ml_MouseEvents and then MachV is signaled. The handler */
  122. /* usually is the only one that needs to set these. */
  123.  
  124. #define ME_BSUN            0    /* activate window under mouse */
  125. #define ME_BKEYSUN        1    /* activate window under mouse caused by keystroke */
  126. #define ME_BCLICKTF        2    /* move window under mouse to front */
  127. #define ME_BCYCLE        3    /* move window or screen under mouse to back */
  128. #define ME_BMOUSEOFF    4    /* turn mouse pointer off */
  129.  
  130. #define ME_SUN            (1 << ME_BSUN)
  131. #define ME_KEYSUN        (1 << ME_BKEYSUN)
  132. #define ME_CLICKTF        (1 << ME_BCLICKTF)
  133. #define ME_CYCLE        (1 << ME_BCYCLE)
  134. #define ME_MOUSEOFF        (1 << ME_BMOUSEOFF)
  135.  
  136.  
  137. /* SetMachV's screen flags. Set in ml_ScreenFlags  */
  138.  
  139. #define SF_WB            1        /* Open on Workbench */
  140. #define SF_CUSTOM        2        /* Open on custom screen */
  141. #define SF_LACE            4        /* Use interlaced custom screen */
  142. #define SF_SCROLL        8        /* Scroll up from bottom */
  143. #define SF_TITLEBAR        0x10    /* Show titlebar */
  144.  
  145.  
  146. /* ml_Trace flags. Set in ml_Trace */
  147.  
  148. #define TRACE_SERIAL  1
  149. #define TRACE_CONSOLE 2
  150.  
  151.  
  152. /* used to wakeup tasks or interface */
  153.  
  154. #define SIG_WAKEUP        SIGBREAKF_CTRL_F 
  155.  
  156.     /* mc_Flag flags */
  157.  
  158. #define MC_BSUNMOUSE        0        /* can sun? */
  159. #define MC_BKEYACTIVATE        1        /* do key activate? */
  160. #define MC_BMOUSETOMENU        2        /* allow mouse to menu? */
  161. #define MC_BMENU_WRAP        3        /* let mouse wrap around menus? */
  162. #define MC_BWINDOWCYCLE        4        /* window cycling? */
  163. #define MC_BAUTO_POPTOP     5        /* auto pop to front? */
  164. #define MC_BKEYCLICK        6        /* key clicking? */
  165. #define MC_BCLOCK            7        /* clock on? */
  166. #define MC_BVERTICALCLOCK    8        /* vertical clock? */
  167. #define MC_BCLOCKTOPWINDOW    9        /* clock can pop to top window? */
  168. #define MC_BCLOCKFLOAT        10        /* clock can float when screen scrolls? */
  169. #define MC_BCLOCK_GADGETS    11        /* clock has gadgets? */
  170. #define MC_BCLOCK_SECONDS    12        /* clock has seconds? */
  171. #define MC_BMETER            13        /* meter on? */
  172. #define MC_BSPLINES         14        /* splines blanking? */
  173. #define MC_BQUICKBLANK        15        /* quick blanking on? */
  174. #define MC_BSPEAKMESSAGES    16        /* speak messages? */
  175. #define MC_BDEBUG            17        /* debug mode? */
  176. #define MC_BBUTTONSWAP        18        /* swap left and right mouse buttons? */
  177. #define MC_BHOLDQUALS        19        /* hold qualifiers? */
  178. #define MC_BHOTKEYENABLED    20        /* hotkeys enabled? */
  179. #define MC_BSEND_UPKEYS      21        /* send up key after each down key? */
  180. #define MC_BNOCAPSLOCK      22        /* disabled caps lock key? */
  181. #define MC_BCLIP_REMOVELF    23        /* remove lf? */
  182. #define MC_BCLIP_CRLF        24        /* lf to crlf? */
  183. #define MC_BFREEZEVERT        25        /* no vertical movements? */
  184. #define MC_BFREEZEHORZ        26        /* no horz movements */
  185. #define MC_BKEYSOFF            27        /* no keys? */
  186. //#define MC_BBORDERLESS        28        /* no border? */
  187. //#define MC_BBORDERBOTTOM    29        /* border bottom */
  188.  
  189. #define MC_SUNMOUSE            (1 << MC_BSUNMOUSE)
  190. #define MC_KEYACTIVATE        (1 << MC_BKEYACTIVATE)
  191. #define MC_MOUSETOMENU        (1 << MC_BMOUSETOMENU)
  192. #define MC_MENU_WRAP        (1 << MC_BMENU_WRAP)
  193. #define MC_WINDOWCYCLE        (1 << MC_BWINDOWCYCLE)
  194. #define MC_AUTO_POPTOP         (1 << MC_BAUTO_POPTOP)
  195. #define MC_KEYCLICK            (1 << MC_BKEYCLICK)
  196. #define MC_CLOCK            (1